import { Provide } from '@midwayjs/decorator';
import { IWebMiddleware } from '@midwayjs/koa';
import * as koaJsonError from 'koa-json-error';

@Provide()
export class ErrorHandlerMiddleware implements IWebMiddleware {
  resolve() {
    return koaJsonError();
  }
}
